-
Notifications
You must be signed in to change notification settings - Fork 851
Fixed some memory leaks with http/3 #9336
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
For reference this is where And |
| HQSession::remove_transaction(HQTransaction *trans) | ||
| { | ||
| this->_transaction_list.remove(trans); | ||
| delete trans; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I feel like I want to delete transactions on the caller side, but I'll propose the change later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is fine, but I wonder why it leaks. Because all transactions in _transaction_list are deleted in the destructor of HQSession. See #9346
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If HQSession::remove_transaction() is called it will remove the transaction from the _transaction_list and it will never be deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, you're right. Go ahead and merge this.
(cherry picked from commit a776a9f)
These numbers are with using freelists:
Before:
SUMMARY: AddressSanitizer: 9997094750 byte(s) leaked in 4587157 allocation(s).After:
SUMMARY: AddressSanitizer: 137185838 byte(s) leaked in 77301 allocation(s).